package cmo.neutech.day11.d2;

public class Account {
    String id;
    double balance;

    public double save(double b){
        return balance+=b;
    }
    public double pay(double  b) throws BNEException{
        if(balance-b < 0){
            throw new BNEException();
        }else {
            return balance-=b;
        }
    }
    public double show(){
        return balance;
    }
}
